﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Power.Common;

namespace Power.Manager
{
    public class SystemStatus
    {
        private static readonly object _lockObj = new object();
        private static SystemStatus _instance = null;
        public static SystemStatus Instance
        {
            get
            {
                lock (_lockObj)
                {
                    if (_instance == null)
                    {
                        _instance = new SystemStatus();
                    }
                    return _instance;
                }
            }
        }

        private SystemStatus()
        {
        }
        #region parameter
        private string _station_id;
        private string _login_user;
        private string _host_Ip;
        private string _db_schema;
        private RunMode _runType;   //运行模式，分为client，server
        private bool _isStartRead;
        private bool _isChangCom = true;
        private string _user_Role;  //用户角色
        private bool _isIgnoreAlarm;  //用于忽略报警
        private int _ignoreCount=20;    //大于这个数量，不在提示警告
        private bool _isStartDCRead;    //直流屏读取标志 

        public bool IsStartDCRead
        {
            get { return _isStartDCRead; }
            set { _isStartDCRead = value; }
        }

        public int IgnoreCount
        {
            get { return _ignoreCount; }
            set { _ignoreCount = value; }
        }
        public bool IsIgnoreAlarm
        {
            get { return _isIgnoreAlarm; }
            set { _isIgnoreAlarm = value; }
        }

        public string User_Role
        {
            get { return _user_Role; }
            set { _user_Role = value; }
        }

        public bool IsChangCom
        {
            get { return _isChangCom; }
            set { _isChangCom = value; }
        }

        public bool IsStartRead
        {
            get { return _isStartRead; }
            set { _isStartRead = value; }
        }        

        public RunMode RunType
        {
            get { return _runType; }
            set { _runType = value; }
        }

        public string Host_Ip
        {
            get { return _host_Ip; }
            set { _host_Ip = value; }
        }
        public string Db_schema
        {
            get { return _db_schema; }
            set { _db_schema = value; }
        }

        public string Station_id
        {
            get { return _station_id; }
            set { _station_id = value; }
        }
        public string Login_user
        {
            get { return _login_user; }
            set { _login_user = value; }
        }
        
        #endregion
    }
}
